import config from "@/config"
import http from "@/utils/request"
import { SysMenuInfoBo } from '../menu/types'
import { ApiResult } from "../common/ApiResultType";
import { da } from "element-plus/es/locale";
import { PageViewModel } from "../common/PageViewType";
export default {
	/**
	 * 获取当前用户的所有菜单
	 */
	userMenus: {
		url: `${config.API_URL}/sysuser/usermenu`,
		name: "获取当前用户的所有菜单",
		post: async function () {
			var res: SysMenuInfoBo[] = await http.post(this.url);
			return res;
		}
	},
	/**
	  * 获取列表数据
	 */
	getList: {
		url: `${config.API_URL}/sysuser/getList`,
		name: "获取全部列表",
		get: async function () {
			var res: ApiResult = await http.get(this.url);
			return res;
		}
	},
	/**
	  * 获取列表数据
	 */
	getPage: {
		url: `${config.API_URL}/sysuser/getPage`,
		name: "获取全部列表",
		post: async function (data: any) {
			var res: PageViewModel = await http.post(this.url, data);
			return res;
		}
	},
}
